package summer_vacation.cullen.three10;

/**
 * Created by Cullen on 2015/8/12.
 */
public class N30 {
    public static void main(String[] args) {
        int a = 0;
        int b = 0;
        double c = 0;
        int g = 0;
        for(a = 1; a <= 100; a++){
            for(b = 1; b <= 100; b++){
                for(c = 1; c <= 100; c++){
                    if(5 * a + 3 * b + c / 3 == 100&&a + b + c ==100){
                        g++;
                        int c1 = (int)c;
                        System.out.println("第" + g +"种方法：");
                        System.out.println("公鸡有：" + a + "只！");
                        System.out.println("母鸡有："+b+"只！");
                        System.out.println("小鸡有："+c1+"只！");
                        System.out.println();
                    }
                }
            }
        }
    }
}
